def cutText(text, sec):
    list_i = list(text)  # str -> list
    print(list_i)
    for i, v in enumerate(list_i):
        if i % sec == 0:
            list_i.insert(i, ' ')  # 注意不用重新赋值
    str_i = ''.join(list_i)  # list -> str
    print(str_i)
    return str_i


if __name__ == '__main__':
    t = 'asfaskjdfhaskfhasklhflaskhdfklasflasdflsadflasdhfashdfjasdkjbasdhbfkjadbjhasbfjhasbfj'
    new = cutText(t, 5)
